package com.katsu.myapplib.http.base64;

import com.katsu.myapplib.util.UtilBitmap;

public class AsyImageBase64 implements AsyBase64 {

    private int w, h, s;

    private String i;

    public AsyImageBase64(String imagePath, int width, int height, int size) {

        this.i = imagePath;

        this.w = width;

        this.h = height;

        this.s = size;

    }

    @Override
    public String toBase64() {

        try {

            return UtilBitmap.toBase64ByPath(i, w, h, s);

        } catch (Exception e) {

            e.printStackTrace();

        }

        return "";

    }
}
